home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 2.iso / relnotes / eoe / chC.z / chC
Text File  |  2002-10-15  |  15KB  |  397 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        1.  _C_o_m_p_a_t_i_b_i_l_i_t_y
  9.  
  10.        This chapter contains information about compatibility issues
  11.        within the IRIX6.x releases with respect to X/Open XPG4
  12.        compliance and Posix compliance and also presents
  13.        information regarding structural changes within the IRIX6.x
  14.        releases that those developing kernel-loaded filesystem code
  15.        need to be aware of.
  16.  
  17.        1.1  _X_P_G_4__c_o_m_p_a_t_i_b_i_l_i_t_y
  18.  
  19.        XPG4 compliance can be achieved by doing one of the
  20.        following:
  21.  
  22.          1.  Installing the all platforms IRIX6.2 release along
  23.              with the 6666....2222++++xxxxppppgggg4444 patch (patch 1125).
  24.  
  25.          2.  Installing the all platforms IRIX6.5 release.
  26.  
  27.        The default behavior for the IRIX6.2 and IRIX6.5 commands is
  28.        non-X/Open XPG4 behavior which is traditional IRIX behavior.
  29.        See the below discussion under ////ssssbbbbiiiinnnn////sssshhhh in order to obtain
  30.        XPG4 behavior under the XPG4 compliant shell environment.
  31.  
  32.        1.1.1  _/_s_b_i_n_/_s_h  In order to obtain XPG4 behavior, the
  33.        ////ssssbbbbiiiinnnn////sssshhhh shell must be used and the following environment
  34.        variables must take on the below settings:
  35.  
  36.        eeeexxxxppppoooorrrrtttt ____XXXXPPPPGGGG====1111
  37.        uuuunnnnsssseeeetttt NNNNOOOOMMMMSSSSGGGGLLLLAAAABBBBEEEELLLL
  38.        eeeexxxxppppoooorrrrtttt NNNNOOOOMMMMSSSSGGGGSSSSEEEEVVVVEEEERRRRIIIITTTTYYYY====1111
  39.  
  40.        Please read the CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY IIIISSSSSSSSUUUUEEEESSSS section of the sssshhhh((((1111))))
  41.        man page for further discussion.
  42.  
  43.        1.1.2  _/_s_b_i_n_/_s_e_d  There are several items which could
  44.        produce compatibility inconsistencies between traditional
  45.        IRIX behavior and X/Open XPG4 behavior.
  46.  
  47.        1.1.2.1  _s__a_n_d__l__c_o_m_m_a_n_d_s  See the man page sssseeeedddd((((1111)))).
  48.  
  49.        1.1.2.2  _e_s_c_a_p_e__c_h_a_r_a_c_t_e_r_s  Since X/Open regular expressions
  50.        were introduced starting in IRIX6.4, there are some
  51.        differences which can occur with respect to the back-slash
  52.        escape character.
  53.  
  54.        The below example shows this incompatibility.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        sed -n -e "/searchfor/,/\};/p" filename
  75.  
  76.        The file 'filename'  doesn't exist.
  77.  
  78.        Under IRIX6.2:
  79.        ==============
  80.        Can't open filename
  81.  
  82.        Under IRIX6.4 & 6.5
  83.        ===================
  84.        sed: command garbled: /searchfor/,/\};/p
  85.  
  86.        The problem lies with the \} sequence because '\{' and '\}' are
  87.        meaningful to the X/Open regular expressions.  The sed script
  88.        is in error by specifying '\}' and should just be '}'.  See the
  89.        BBBBaaaassssiiiicccc RRRReeeegggguuuullllaaaarrrr EEEExxxxpppprrrreeeessssssssiiiioooonnnnssss section from rrrreeeeggggccccoooommmmpppp((((5555)))).
  90.  
  91.        1.1.3  _/_s_b_i_n_/_r_m  The ----iiii and the ----ffff options if both specified
  92.        have a defined XPG4 behavior.  From the XPG4 specification:
  93.  
  94.             ----iiii ---- PPPPrrrroooommmmpppptttt ffffoooorrrr ccccoooonnnnffffiiiirrrrmmmmaaaattttiiiioooonnnn aaaassss ddddeeeessssccccrrrriiiibbbbeeeedddd pppprrrreeeevvvviiiioooouuuussssllllyyyy.... AAAAnnnnyyyy
  95.             pppprrrreeeevvvviiiioooouuuussss ooooccccccccuuuurrrrrrrreeeennnncccceeeessss ooooffff tttthhhheeee ----ffff ooooppppttttiiiioooonnnn wwwwiiiillllllll bbbbeeee iiiiggggnnnnoooorrrreeeedddd....
  96.  
  97.        E.g., rrrrmmmm ----ffff ----iiii behaves differently than rrrrmmmm ----iiii ----ffff.  This is
  98.        most of an issue with shell aliases or functions.
  99.  
  100.        1.1.4  _/_u_s_r_/_b_i_n_/_l_o_c_a_l_e_d_e_f  There is an incompatibility
  101.        between generated versions of the LLLLCCCC____TTTTYYYYPPPPEEEE locale category
  102.        prior to the IRIX 6.5 release and IRIX 6.5.  That is, binary
  103.        locales generated prior to IRIX 6.5 will not be recognized
  104.        by IRIX 6.5 and must be regenerated with the IRIX 6.5
  105.        version of llllooooccccaaaalllleeeeddddeeeeffff((((1111)))).  See the NNNNOOOOTTTTEEEE section in the
  106.        llllooooccccaaaalllleeeeddddeeeeffff((((1111)))) man page.
  107.  
  108.        1.1.5  _r_e_g_u_l_a_r__e_x_p_r_e_s_s_i_o_n_s  In IRIX6.3 and earlier the below
  109.        IRIX 6.x versions of the commands:
  110.  
  111.        sssseeeedddd,,,, eeeedddd,,,, eeeexxxx,,,, eeeexxxxpppprrrr,,,, vvvviiii,,,, ggggrrrreeeepppp,,,, eeeeggggrrrreeeepppp,,,, fffflllleeeexxxx,,,, aaaawwwwkkkk,,,, ffffiiiinnnndddd,,,, ppppaaaaxxxx,,,, mmmmoooorrrreeee
  112.  
  113.        all used the rrrreeeeggggeeeexxxxpppp((((5555)))) version of regular expressions.  In
  114.        IRIX6.4 and later versions of the above commands use the
  115.        rrrreeeeggggccccoooommmmpppp((((5555)))) X/Open version of regular expressions.
  116.  
  117.        1.1.6  _k_e_r_n_e_l__s_y_s_t_u_n_e_s  The following systune variables must
  118.        be set to be XPG4 compliant:
  119.  
  120.        ppppoooossssiiiixxxx____ttttttttyyyy____ddddeeeeffffaaaauuuulllltttt 1111
  121.        rrrreeeessssttttrrrriiiicccctttteeeedddd____cccchhhhoooowwwwnnnn 1111
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        1.1.7  _c_o_m_p_i_l_a_t_i_o_n__e_n_v_i_r_o_n_m_e_n_t  The XPG4 compatible compiler
  141.        is ////uuuussssrrrr////bbbbiiiinnnn////cccc88889999.  The following command line options must be
  142.        passed to the ////uuuussssrrrr////bbbbiiiinnnn////cccc88889999 compiler:
  143.  
  144.        ----DDDD____XXXXOOOOPPPPEEEENNNN____SSSSOOOOUUUURRRRCCCCEEEE ----UUUUuuuunnnniiiixxxx
  145.  
  146.        1.1.8  _/_s_b_i_n_/_t_o_u_c_h  There is a Y2K incompatibility issue
  147.        with the ttttoooouuuucccchhhh command in IRIX releases prior to IRIX 6.5.
  148.        Refer to the SGI Y2K web site
  149.        (http://www.sgi.com/tech/year2000/) for information on SGI
  150.        Y2K issues, as well as patches for this specific issue.  See
  151.        the ttttoooouuuucccchhhh((((1111)))) man page for the ----tttt option usage.
  152.  
  153.        In particular, the behavior of the frequently used kernel
  154.        driver exitop (to force kernels to be rebuilt after new
  155.        drivers are installed) ttttoooouuuucccchhhh 0000111100001111000000000000000000000000 is now different,
  156.        and its use will cause kernels to not be rebuilt when they
  157.        should.  Instead use ttttoooouuuucccchhhh 111199997777000000001111000011110000000000000000.
  158.  
  159.        1.2  _P_o_s_i_x__c_o_m_p_a_t_i_b_i_l_i_t_y
  160.  
  161.        1.2.1  _k_e_r_n_e_l__s_y_s_t_u_n_e_s  The following systune variables must
  162.        be set to be POSIX compliant:
  163.  
  164.        ppppoooossssiiiixxxx____ttttttttyyyy____ddddeeeeffffaaaauuuulllltttt 1111
  165.        rrrreeeessssttttrrrriiiicccctttteeeedddd____cccchhhhoooowwwwnnnn 1111
  166.  
  167.        1.3  _F_i_l_e_s_y_s_t_e_m__i_m_p_l_e_m_e_n_t_a_t_i_o_n__i_s_s_u_e_s
  168.  
  169.        Significant changes have been made in IRIX6.x releases that
  170.        those implementing and maintaining kernel-loaded filesystems
  171.        need to be particularly aware of:
  172.  
  173.          1.  In IRIX6.4, a behavior stacking model was introduced
  174.              which changes substantially the structure of VOP and
  175.              VFS op signatures and requires other changes in
  176.              filesystem code designed to be loaded with the kernel.
  177.  
  178.          2.  In IRIX6.5, the requirements for the use of the
  179.              behavior stacking code have been tightened, requiring
  180.              changes in addition to the normal modification of
  181.              filesystem code to adapt to additions or signature
  182.              changes in the VOP and VFS interfaces between IRIX6.4
  183.              and IRIX6.5.
  184.  
  185.        1.3.1  _B_e_h_a_v_i_o_r__s_t_a_c_k_i_n_g__m_o_d_e_l__i_n__I_R_I_X_6_._4  IRIX6.4
  186.        introduced new structures associated with v-objects such as
  187.        vnodes and vfs's.  These allow multiple layers of filesystem
  188.        implementation to be stacked such that one layer may
  189.        interpose on calls (such as VOP's) for the v-object.  This
  190.        structure has necessitated changes in external filesystem
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        code, even when the filesystem in question does not
  207.        explicitly use any new features of this model.
  208.  
  209.        In IRIX6.4, the behavior head and behavior descriptor
  210.        structures were introduced and the VOP and VFS interfaces
  211.        were modified so that the initial parameter passed to the
  212.        called ops functions was the behavior descriptor, rather
  213.        then the v-object (vnode or vfs) itself.  In addition,
  214.        filesystems needed to link a behavior descriptor onto the
  215.        behavior chain and remove the behavior descriptor at object
  216.        initialization and destruction time respectively.
  217.  
  218.        For filesystems using non-VSHARE vnodes,  (non-VSHARE vnode
  219.        are those whose allocation is directly managed by the
  220.        filesystem. VSHARE vnodes are managed in a global vnode pool
  221.        shared by multiple filesystems), the filesystem needs to
  222.        properly initialize the behavior head of the vnode
  223.        immediately after it is allocated (using vn_bhv_head_init)
  224.        and call a destroy function (vn_bhv_head_destroy) on the
  225.        behavior head immediately before deallocating the vnode.
  226.  
  227.        If a filesystem implementation allocates its own vfs
  228.        structures, similar requirements apply.  The behavior head
  229.        within the vfs should be initialized using bhv_head_init and
  230.        bhv_head_destroy should be called before deallocating the
  231.        memory of the vfs structure.  This would be an unusual
  232.        situation since typically the vfs is allocated by the kernel
  233.        before calling the filesystem VFS_MOUNT routine and
  234.        deallocated by the kernel after the filesystem's VFS_UNMOUNT
  235.        routine has executed.
  236.  
  237.        See /usr/include/sys/vnode.h, /usr/include/sys/vfs.h, and
  238.        /usr/include/ksys/behavior.h for a lot of relevant detail.
  239.  
  240.        1.3.2  _F_u_r_t_h_e_r__r_e_q_u_i_r_e_m_e_n_t_s__f_o_r__I_R_I_X_6_._5  For filesystem code
  241.        developed to run in an IRIX6.4 kernel environment, the major
  242.        change has to do with requirements to intialize and destroy
  243.        behavior head structures in non-VSHARE vnode and in vfs
  244.        structures allocated by the filesystem itself.
  245.  
  246.         While this was also part of the interface for IRIX6.4, as
  247.        described above, the implementation allowed filesystem code
  248.        to run successfully without dealing properly with the
  249.        behavior head structures.  In particular, if the vnode (or
  250.        an allocated vfs) was zeroed, the behavior head
  251.        initialization did not need to be done and also, the destroy
  252.        function was a no-op.  In IRIX6.5, this is no longer the
  253.        case, the behavior head for a non-VSHARE vnode must be
  254.        properly initialized and destroyed.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        Also note that it is more critical in IRIX6.5 that behaviors
  273.        are properly unstacked before the objects associated with
  274.        them are made available for dellocation.  This may have gone
  275.        unnnoticed in IRIX6.4.
  276.  
  277.        1.3.3  _S_u_m_m_a_r_y _o_f _r_e_q_u_i_r_e_m_e_n_t_s _f_o_r _b_e_h_a_v_i_o_r _s_t_r_u_c_t_u_r_e
  278.        _m_a_n_a_g_e_m_e_n_t
  279.  
  280.        1.3.3.1  _F_o_r__n_o_n_-_V_S_H_A_R_E__v_n_o_d_e_s  A filesystem should, after
  281.        using vn_alloc:
  282.  
  283.          1.  Initialize its behavior descriptor using
  284.              vn_bhv_desc_init.
  285.  
  286.          2.  Link the behavior descriptor into the behavior head
  287.              using vn_bhv_insert_initial.
  288.        A filesystem should remove its behavior descriptor using
  289.        vn_bhv_remove before returning from a VOP_RECLAIM or
  290.        VOP_INACTIVE returning VN_INACTIVE_NOCACHE or before doing a
  291.        direct vn_free.
  292.  
  293.        1.3.3.2  _F_o_r__n_o_n_-_V_S_H_A_R_E__v_n_o_d_e_s  A filesystem should, after
  294.        allocating a vnode:
  295.  
  296.          1.  Initialize its behavior descriptor using
  297.              vn_bhv_desc_init.
  298.  
  299.          2.  Initialize the behavior head of a new vnode using
  300.              vn_bhv_head_init.
  301.  
  302.          3.  Link the behavior descriptor into the behavior head
  303.              using vn_bhv_insert_initial.
  304.        Before deallocating a vnode, a filesystem should:
  305.  
  306.          1.  Remove its behavior descriptor using vn_bhv_remove.
  307.  
  308.          2.  Call vn_bhv_head_destroy on the behavior head for the
  309.              vnode to be deallocated.
  310.  
  311.        1.3.3.3  _F_o_r__n_o_r_m_a_l__(_i_._e__k_e_r_n_e_l_-_a_l_l_o_c_a_t_e_d_)__v_f_s__s_t_r_u_c_t_u_r_e_s
  312.        At mount time, the filesystem should initialize its behavior
  313.        descriptor and insert it in the vfs behavior head using
  314.        vfs_insertbhv.
  315.  
  316.        At unmount time, the filesystem should remove its behavior
  317.        descriptor from the vfs behavior head using VFS_REMOVEBHV.
  318.  
  319.        1.3.3.4  _F_o_r _v_f_s _s_t_r_u_c_t_u_r_e_s _a_l_l_o_c_a_t_e_d _b_y _t_h_e _f_i_l_e_s_y_s_t_e_m
  320.        _i_t_s_e_l_f  After allocating such a vfs structure, the
  321.        filesystem should:
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.          1.  Initialize the behavior head within the vfs, using
  339.              bhv_head_init.
  340.  
  341.          2.  Initialize its behavior descriptor and insert it in
  342.              the vfs behavior head using vfs_insertbhv.
  343.        Before deallocating such a vfs structure, the filesystem
  344.        should:
  345.  
  346.          1.  Remove its behavior descriptor from the vfs behavior
  347.              head using VFS_REMOVEBHV.
  348.  
  349.          2.  Use bhv_head_destroy on the behavior head for the vfs
  350.              to get rid of any associated resources.
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.